package com.jctrip.hotel.management.model.result;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

/**
 * @Author: zxy
 * @CreateTime: 2023-08-22 16:52
 * @Description:
 */
@Builder
@Data
@ApiModel("价格政策列表-返回体")
@NoArgsConstructor
@AllArgsConstructor
public class GetFeizhuPricePolicyResult implements Serializable{
    @ApiModelProperty("价格政策列表")
    private List<PricePolicyInfo> records;

    private Long pages;

    private Long total;

    private Long current;

    private Long size;

    @Builder
    @Data
    @ApiModel("价格政策对象")
    @NoArgsConstructor
    @AllArgsConstructor
    public static class PricePolicyInfo implements Serializable {
        private String id;
        private String pricePolicyId;
        private String pricePolicyName;
        private Integer pricePolicyStatus;
        private String routeId;
        private String routeChannelCode;
        private Integer paymentType;
        private Integer priceCode;
        private Integer priceGuide;
        private BigDecimal priceTolerance;
        private String pricePolicyCode;
        private Integer breakfastCount;
        private CanCelRuleInfo cancelRule;
        private String extra;
        private List<PricePolicyRangeInfo> pricePolicyRangeInfos;
        private String routeName;
        private String sourceName;
        private String sourceCode;
    }

    @Builder
    @Data
    @ApiModel("取消规则")
    @NoArgsConstructor
    @AllArgsConstructor
    public static class CanCelRuleInfo implements Serializable{
        private Integer cancelPolicyType;

        private Map<String, Object> policyInfo;
    }

    @Builder
    @Data
    @ApiModel("政策区间对象")
    @NoArgsConstructor
    @AllArgsConstructor
    public static class PricePolicyRangeInfo implements Serializable{
        private String id;
        private BigDecimal rangePriceMin;
        private BigDecimal rangePriceMax;
        private BigDecimal markupRate;
        private BigDecimal markupFixed;
    }
}
